$(function() {
	
	/*var ua = navigator.userAgent.toLowerCase();
	var isWeixin = ua.indexOf('micromessenger') != -1;
	if(isWeixin){
	
	var loginUrl = "https://debug.soonu.top/account/wx/login";
	var url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx08eb0b771b25a0b3&redirect_uri="
			+ encodeURIComponent(loginUrl)
			+ "&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect";
			$(location).prop('href', url);
	}	*/
 
});

function showErrMsg(id,msg){
	$("#" + id + "Tip").text(msg);
	$("#" + id + "Msg").show();
}

function hideMsg(id) {
	$("#" + id + "Msg").hide();
}

function focusById(){
	$("#province,#city,#area").change(function(){
		if($('#province option:selected').val() != 0 
				&& $('#city option:selected').val() != 0 
				&& $('#area option:selected').val() != 0 ) {
			hideMsg("aWord");
		}
	});
	$("#address").focus(function(){
		hideMsg("address");
	});
	$("#receiver").focus(function(){
		hideMsg("receiver");
	});
	$("#phone").focus(function(){
		hideMsg("phone");
	});
}